using System;
using System.Collections.Generic;
using System.Text;
using AF_ORM.CORE;
using System.Data;
using System.Configuration;
using Bussiness.Config;     
using Bussiness.Entity;
namespace Bussiness.ManagerBase
{
                

     public abstract class CmsProductsManagerBase
    {
        public CmsProductsManagerBase()
        {
            Adapter.ConnectionString =  ConnectionConfig.ConnectionString;            
        }
                    
 
        /// <summary>
        /// Them moi du lieu
        /// </summary>
        /// <returns>CmsProductsEntity</returns>
        public CmsProductsEntity Insert(CmsProductsEntity obj)
        { 
            return (CmsProductsEntity) Adapter.Insert(obj);             
        }
 
 
        /// <summary>
        /// Update du lieu theo khoa chinh cua object
        /// </summary>
        /// <returns>CmsProductsEntity</returns>
        public CmsProductsEntity Update(CmsProductsEntity obj)
        { 
            return (CmsProductsEntity)Adapter.Update(obj);             
        }
 
 
        public CmsProductsEntity Delete(CmsProductsEntity obj)
        { 
            return (CmsProductsEntity)Adapter.Delete(obj);             
        }
 


        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CategoryId duoc set trong object
        /// </summary>
        /// <returns>CmsProductsEntity</returns>
        public CmsProductsEntity DeleteByCategoryId (CmsProductsEntity obj)
        { 
            return (CmsProductsEntity)Adapter.DeleteByField(obj,"CategoryId");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CategoryId 
        /// </summary>
        /// <returns>CmsProductsEntity</returns>
        public CmsProductsEntity DeleteByCategoryId (Guid CategoryId )
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.CategoryId = CategoryId;  
            return (CmsProductsEntity)Adapter.DeleteByField(obj,"CategoryId");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>CmsProductsEntity</returns>
        public CmsProductsEntity DeleteById (CmsProductsEntity obj)
        { 
            return (CmsProductsEntity)Adapter.DeleteByField(obj,"Id");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Id 
        /// </summary>
        /// <returns>CmsProductsEntity</returns>
        public CmsProductsEntity DeleteById (Guid Id )
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.Id = Id;  
            return (CmsProductsEntity)Adapter.DeleteByField(obj,"Id");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien IntId duoc set trong object
        /// </summary>
        /// <returns>CmsProductsEntity</returns>
        public CmsProductsEntity DeleteByIntId (CmsProductsEntity obj)
        { 
            return (CmsProductsEntity)Adapter.DeleteByField(obj,"IntId");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien IntId 
        /// </summary>
        /// <returns>CmsProductsEntity</returns>
        public CmsProductsEntity DeleteByIntId (int IntId )
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.IntId = IntId;  
            return (CmsProductsEntity)Adapter.DeleteByField(obj,"IntId");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Photo duoc set trong object
        /// </summary>
        /// <returns>CmsProductsEntity</returns>
        public CmsProductsEntity DeleteByPhoto (CmsProductsEntity obj)
        { 
            return (CmsProductsEntity)Adapter.DeleteByField(obj,"Photo");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Photo 
        /// </summary>
        /// <returns>CmsProductsEntity</returns>
        public CmsProductsEntity DeleteByPhoto (string Photo )
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.Photo = Photo;  
            return (CmsProductsEntity)Adapter.DeleteByField(obj,"Photo");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Price duoc set trong object
        /// </summary>
        /// <returns>CmsProductsEntity</returns>
        public CmsProductsEntity DeleteByPrice (CmsProductsEntity obj)
        { 
            return (CmsProductsEntity)Adapter.DeleteByField(obj,"Price");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Price 
        /// </summary>
        /// <returns>CmsProductsEntity</returns>
        public CmsProductsEntity DeleteByPrice (double Price )
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.Price = Price;  
            return (CmsProductsEntity)Adapter.DeleteByField(obj,"Price");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien ProductCode duoc set trong object
        /// </summary>
        /// <returns>CmsProductsEntity</returns>
        public CmsProductsEntity DeleteByProductCode (CmsProductsEntity obj)
        { 
            return (CmsProductsEntity)Adapter.DeleteByField(obj,"ProductCode");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien ProductCode 
        /// </summary>
        /// <returns>CmsProductsEntity</returns>
        public CmsProductsEntity DeleteByProductCode (string ProductCode )
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.ProductCode = ProductCode;  
            return (CmsProductsEntity)Adapter.DeleteByField(obj,"ProductCode");
        }

 
        /// <summary>
        /// Lay du lieu theo khoa chinh object
        /// </summary>
        /// <returns></returns>
        public CmsProductsEntity Select(CmsProductsEntity obj)
        { 
            return (CmsProductsEntity) Adapter.Select(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(CmsProductsEntity obj)
        { 
            return  Adapter.SelectWithCondition(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(CmsProductsEntity obj,SelectOptions option)
        {             
            return  Adapter.SelectWithCondition(obj,option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll()
        { 
            return Adapter.SelectAll(new CmsProductsEntity());             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll(SelectOptions option)
        { 
            return Adapter.SelectAll(new CmsProductsEntity(),option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<CmsProductsEntity> SelectAllLST()
        { 
            return  (List<CmsProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new CmsProductsEntity()),new CmsProductsEntity());           
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<CmsProductsEntity> SelectAllLST(SelectOptions option)
        { 
            return (List<CmsProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new CmsProductsEntity(),option),new CmsProductsEntity());             
        }
 

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCategoryId (CmsProductsEntity obj)
        { 
            return Adapter.SelectByField(obj,"CategoryId");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCategoryId (CmsProductsEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"CategoryId",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId duoc set trong object
        /// </summary>
        /// <returns>List<CmsProductsEntity></returns>
        public List<CmsProductsEntity> SelectByCategoryIdLST (CmsProductsEntity obj)
        { 
            return  (List<CmsProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CategoryId"),new CmsProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId duoc set trong object
        /// </summary>
        /// <returns>List<CmsProductsEntity></returns>
        public List<CmsProductsEntity> SelectByCategoryIdLST (CmsProductsEntity obj,SelectOptions option)
        { 
            return  (List<CmsProductsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"CategoryId",option),new CmsProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCategoryId (Guid CategoryId )
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.CategoryId = CategoryId;  
            return Adapter.SelectByField(obj,"CategoryId");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCategoryId (Guid CategoryId, SelectOptions option)
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.CategoryId = CategoryId;  
            return Adapter.SelectByField(obj,"CategoryId",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsProductsEntity> SelectByCategoryIdLST (Guid CategoryId )
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.CategoryId = CategoryId;  
            return  (List<CmsProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CategoryId"),new CmsProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsProductsEntity> SelectByCategoryIdLST (Guid CategoryId, SelectOptions option)
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.CategoryId = CategoryId;  
            return  (List<CmsProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CategoryId",option),new CmsProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectById (CmsProductsEntity obj)
        { 
            return Adapter.SelectByField(obj,"Id");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectById (CmsProductsEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"Id",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>List<CmsProductsEntity></returns>
        public List<CmsProductsEntity> SelectByIdLST (CmsProductsEntity obj)
        { 
            return  (List<CmsProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Id"),new CmsProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>List<CmsProductsEntity></returns>
        public List<CmsProductsEntity> SelectByIdLST (CmsProductsEntity obj,SelectOptions option)
        { 
            return  (List<CmsProductsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"Id",option),new CmsProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectById (Guid Id )
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.Id = Id;  
            return Adapter.SelectByField(obj,"Id");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectById (Guid Id, SelectOptions option)
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.Id = Id;  
            return Adapter.SelectByField(obj,"Id",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsProductsEntity> SelectByIdLST (Guid Id )
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.Id = Id;  
            return  (List<CmsProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Id"),new CmsProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsProductsEntity> SelectByIdLST (Guid Id, SelectOptions option)
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.Id = Id;  
            return  (List<CmsProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Id",option),new CmsProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IntId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByIntId (CmsProductsEntity obj)
        { 
            return Adapter.SelectByField(obj,"IntId");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IntId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByIntId (CmsProductsEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"IntId",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IntId duoc set trong object
        /// </summary>
        /// <returns>List<CmsProductsEntity></returns>
        public List<CmsProductsEntity> SelectByIntIdLST (CmsProductsEntity obj)
        { 
            return  (List<CmsProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"IntId"),new CmsProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IntId duoc set trong object
        /// </summary>
        /// <returns>List<CmsProductsEntity></returns>
        public List<CmsProductsEntity> SelectByIntIdLST (CmsProductsEntity obj,SelectOptions option)
        { 
            return  (List<CmsProductsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"IntId",option),new CmsProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IntId 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByIntId (int IntId )
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.IntId = IntId;  
            return Adapter.SelectByField(obj,"IntId");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IntId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByIntId (int IntId, SelectOptions option)
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.IntId = IntId;  
            return Adapter.SelectByField(obj,"IntId",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IntId 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsProductsEntity> SelectByIntIdLST (int IntId )
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.IntId = IntId;  
            return  (List<CmsProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"IntId"),new CmsProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IntId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsProductsEntity> SelectByIntIdLST (int IntId, SelectOptions option)
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.IntId = IntId;  
            return  (List<CmsProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"IntId",option),new CmsProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Photo duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByPhoto (CmsProductsEntity obj)
        { 
            return Adapter.SelectByField(obj,"Photo");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Photo duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByPhoto (CmsProductsEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"Photo",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Photo duoc set trong object
        /// </summary>
        /// <returns>List<CmsProductsEntity></returns>
        public List<CmsProductsEntity> SelectByPhotoLST (CmsProductsEntity obj)
        { 
            return  (List<CmsProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Photo"),new CmsProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Photo duoc set trong object
        /// </summary>
        /// <returns>List<CmsProductsEntity></returns>
        public List<CmsProductsEntity> SelectByPhotoLST (CmsProductsEntity obj,SelectOptions option)
        { 
            return  (List<CmsProductsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"Photo",option),new CmsProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Photo 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByPhoto (string Photo )
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.Photo = Photo;  
            return Adapter.SelectByField(obj,"Photo");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Photo duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByPhoto (string Photo, SelectOptions option)
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.Photo = Photo;  
            return Adapter.SelectByField(obj,"Photo",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Photo 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsProductsEntity> SelectByPhotoLST (string Photo )
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.Photo = Photo;  
            return  (List<CmsProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Photo"),new CmsProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Photo duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsProductsEntity> SelectByPhotoLST (string Photo, SelectOptions option)
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.Photo = Photo;  
            return  (List<CmsProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Photo",option),new CmsProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Price duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByPrice (CmsProductsEntity obj)
        { 
            return Adapter.SelectByField(obj,"Price");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Price duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByPrice (CmsProductsEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"Price",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Price duoc set trong object
        /// </summary>
        /// <returns>List<CmsProductsEntity></returns>
        public List<CmsProductsEntity> SelectByPriceLST (CmsProductsEntity obj)
        { 
            return  (List<CmsProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Price"),new CmsProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Price duoc set trong object
        /// </summary>
        /// <returns>List<CmsProductsEntity></returns>
        public List<CmsProductsEntity> SelectByPriceLST (CmsProductsEntity obj,SelectOptions option)
        { 
            return  (List<CmsProductsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"Price",option),new CmsProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Price 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByPrice (double Price )
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.Price = Price;  
            return Adapter.SelectByField(obj,"Price");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Price duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByPrice (double Price, SelectOptions option)
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.Price = Price;  
            return Adapter.SelectByField(obj,"Price",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Price 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsProductsEntity> SelectByPriceLST (double Price )
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.Price = Price;  
            return  (List<CmsProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Price"),new CmsProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Price duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsProductsEntity> SelectByPriceLST (double Price, SelectOptions option)
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.Price = Price;  
            return  (List<CmsProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Price",option),new CmsProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ProductCode duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByProductCode (CmsProductsEntity obj)
        { 
            return Adapter.SelectByField(obj,"ProductCode");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ProductCode duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByProductCode (CmsProductsEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"ProductCode",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ProductCode duoc set trong object
        /// </summary>
        /// <returns>List<CmsProductsEntity></returns>
        public List<CmsProductsEntity> SelectByProductCodeLST (CmsProductsEntity obj)
        { 
            return  (List<CmsProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"ProductCode"),new CmsProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ProductCode duoc set trong object
        /// </summary>
        /// <returns>List<CmsProductsEntity></returns>
        public List<CmsProductsEntity> SelectByProductCodeLST (CmsProductsEntity obj,SelectOptions option)
        { 
            return  (List<CmsProductsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"ProductCode",option),new CmsProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ProductCode 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByProductCode (string ProductCode )
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.ProductCode = ProductCode;  
            return Adapter.SelectByField(obj,"ProductCode");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ProductCode duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByProductCode (string ProductCode, SelectOptions option)
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.ProductCode = ProductCode;  
            return Adapter.SelectByField(obj,"ProductCode",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ProductCode 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsProductsEntity> SelectByProductCodeLST (string ProductCode )
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.ProductCode = ProductCode;  
            return  (List<CmsProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"ProductCode"),new CmsProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ProductCode duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsProductsEntity> SelectByProductCodeLST (string ProductCode, SelectOptions option)
        { 
            CmsProductsEntity obj = new CmsProductsEntity();
            obj.ProductCode = ProductCode;  
            return  (List<CmsProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"ProductCode",option),new CmsProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<CmsProductsEntity></returns>
        public List<CmsProductsEntity> SelectWithConditionLST (CmsProductsEntity obj)
        { 
            return  (List<CmsProductsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj),new CmsProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<CmsProductsEntity></returns>
        public List<CmsProductsEntity> SelectWithConditionLST (CmsProductsEntity obj,SelectOptions option)
        { 
            return  (List<CmsProductsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj,option),new CmsProductsEntity());
        }

}
}
